package com.cscj.android.repository.repo.history

import android.graphics.Bitmap
import com.cscj.android.repository.db.entity.BrowseHistoryEntity
import kotlinx.coroutines.flow.Flow

interface BrowserHistoryRepository {

    suspend fun init()

    suspend fun addBrowserHistory(title: String, url: String, favicon: Bitmap?)

    fun browserHistoryList(keyword: String? = null): Flow<List<BrowseHistoryEntity>>

    fun allBrowserHistory(): Flow<List<BrowseHistoryEntity>>

    suspend fun deleteByIds(ids: IntArray)

    suspend fun clearAllHistory()

    suspend fun updateFavicon(url: String, favicon: Bitmap?)

}